<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Search Member</title>
<script type="text/javascript" src="<c:url value="/js/jquery.js"/>"></script>
<script src="<c:url value="/js/jquery.cookie.js"/>"></script>
<script src="<c:url value="/js/bootstrap.min.js"/>"></script>
<link rel="stylesheet" type="text/css" href="<c:url value="/css/bootstrap.min.css"/>">

<script type="text/javascript">     
      
</script>


</head>
<body>
	<form:form commandName="member">
		<table>
			<tr>
				<td>Firstname:</td>
				<td><form:input path="firstname" size="60" /></td>
				
			</tr>
			<tr>
				<td>Email:</td>
				<td><form:input path="email" size="60" /></td>
				
			</tr>
			<tr>
			<td colspan ="2" style="text-align:right" ><input type="submit"
					value="Search" /></td>
			</tr>
		</table>
	</form:form>
	
	<a href="<c:url value="/member/add" />">Add</a>

	<table class="table table-bordered table-hover">
		<tr>
			<th>No.</th>
			<th>Name</th>
			<th>Email</th>
		</tr>
		<c:forEach var="member" items="${memberList}"
			varStatus="memberStatus">
			<tr id="row_${member.id}">
				<td>${memberStatus.index+1}</td>
				<td>${member.firstname}</td>
				<td>${member.email}</td>
				<td>
					<div class="btn-group">			
						<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown"
							href="#"><i class="icon-th-large icon-white"></i><span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="<c:url value="/member/edit/${member.id}" />">
								<i class="icon-pencil"></i> Edit </a></li>
							<li><a href="<c:url value="/member/delete/${member.id}" />">
								<i class="icon-trash"></i> Delete</a></li>
						</ul>
					</div>
				</td>
			</tr>
		</c:forEach>
	</table>
	
</body>
</html>